package com.dbexplore.service;

import com.dbexplore.db.structure.Table;
import com.dbexplore.db.DatabaseGateway;

import java.util.List;
import java.util.ArrayList;
import java.sql.SQLException;

import org.apache.log4j.Logger;

public class TableService {
    Logger  logger = Logger.getLogger(TableService.class);

    public List<Table> getAllTables(){
          DatabaseGateway databaseGateway = new DatabaseGateway();
          try {
              return databaseGateway.getAllTables();
          } catch (SQLException e) {
              logger.error(e);
              return new ArrayList<Table>();
          }
      }


}
